package com.yifeng.repo.micro.service.server.mps;

import feign.Param;
import feign.RequestLine;
import next.fire.mps.api.MessageService;
import next.fire.mps.api.model.DataListWithCursor;
import next.fire.mps.api.model.MsgResultItem;
import next.fire.mps.api.model.MsgSceneEnum;
import next.fire.mps.api.model.MsgTaskItem;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.Map;

@FeignClient(name = "mpsMessageServiceClient", url = "${yfcloud.micro.service.mps.url}", path = "/fire-mps")
public interface MessageServiceClient extends MessageService {

    @Override
    @RequestLine("POST /MessageService/send")
    String send(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("msgScene") MsgSceneEnum msgScene, @Param("msgData")Map msgData);

    @Override
    @RequestLine("POST /MessageService/send")
    String send(@Param("appId")String appId, @Param("merchantId") String merchantId, @Param("mpAppId")String mpAppId, @Param("msgScene") MsgSceneEnum msgScene,
                @Param("msgData") Map msgData);

    @Override
    @RequestLine("POST /MessageService/listSend")
    DataListWithCursor<String> listSend(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("msgData") Map msgData);

    @Override
    @RequestLine("POST /MessageService/listSendMsgTask")
    DataListWithCursor<MsgTaskItem> listSendMsgTask(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("msgData") Map msgData);

    @Override
    @RequestLine("POST /MessageService/listMsgResult")
    DataListWithCursor<MsgResultItem> listMsgResult(@Param("merchantId") String merchantId, @Param("mpAppId") String mpAppId, @Param("msgData") Map msgData);
}
